using System;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay
{
    public class TransformHold : MonoBehaviour
    {
        public bool holdPosition;
        public bool holdRotation;

        private Vector3 awakePos;
        private Quaternion awakeRot;
        private void Awake()
        {
            this.awakePos = this.transform.position;
            this.awakeRot = this.transform.rotation;
        }

        private void Update()
        {
            if (this.holdPosition)
            {
                this.transform.position = this.awakePos;
            }
            if (this.holdRotation)
            {
                this.transform.rotation = this.awakeRot;
            }
        }
    }
}